import {
    _decorator,
    BoxCollider2D,
    Component,
    Node,
    UITransform,
} from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Wall')
export class Wall extends Component {
    protected onLoad(): void {
        const boxCollider = this.node.getComponent(BoxCollider2D);
        const ui = this.node.getComponent(UITransform);
        boxCollider.size = ui.contentSize;
    }
}
